Player Hidden Keywords related to SearchLibrary#10219
Draft
kojotak wants to merge 4 commits intoCard-Forge:masterfrom
Draft
Player Hidden Keywords related to SearchLibrary#10219kojotak wants to merge 4 commits intoCard-Forge:masterfrom
kojotak wants to merge 4 commits intoCard-Forge:masterfrom
Conversation
kojotak
commented
Mar 30, 2026
forge-game/src/main/java/forge/game/staticability/StaticAbilitySearchLibrary.java
Show resolved
Hide resolved
tool4ever
reviewed
Mar 30, 2026
| Types:Creature Cat Cleric | ||
| PT:2/2 | ||
| S:Mode$ Continuous | Affected$ Player | AddKeyword$ CantSearchLibrary | IgnoreEffectCost$ 2 | Description$ Players can't search libraries. Any player may pay {2} for that player to ignore this effect until end of turn. | ||
| S:Mode$ CantSearchLibrary | ValidPlayer$ Player | IgnoreEffectCost$ 2 | Description$ Players can't search libraries. Any player may pay {2} for that player to ignore this effect until end of turn. |
Contributor
There was a problem hiding this comment.
@kojotak check "Volrath's Curse" for both Continuous and other modes
in this case, it should be something like this:
Mode$ Continuous,CantSearchLibrary | Affected$ Player | ValidPlayer$ Player | IgnoreEffectCost$ 2
Contributor
Author
496b3a5 to
98f3002
Compare
tool4ever
reviewed
Mar 31, 2026
| } | ||
| return targetPlayer == null || !targetPlayer.equals(sa.getActivatingPlayer()) | ||
| || !hasKeyword("Spells and abilities you control can't cause you to search your library."); | ||
| || !StaticAbilityCantSearchLibrary.cantCauseToSearchLibrary(this); |
Contributor
There was a problem hiding this comment.
this should just use the same method above so it can be more dynamic
Contributor
Author
There was a problem hiding this comment.
Do you mean:
- remove the
cantCauseToSearchLibrary()method completely - add check for
CantCauseToSearchLibrarymode intocantSearchLibrary()?
Contributor
There was a problem hiding this comment.
it's just a slightly more specific variant, not a different mode
we usually have one entry point, so scripts can just use params for their needs
tool4ever
reviewed
Mar 31, 2026
| K:Flash | ||
| K:Flying | ||
| S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ LimitSearchLibrary | Description$ If an opponent would search a library, that player searches the top four cards of that library instead. | ||
| S:Mode$ LimitSearchLibrary | ValidPlayer$ Player.Opponent | LimitNum$ 4 | Description$ If an opponent would search a library, that player searches the top four cards of that library instead. |
Contributor
There was a problem hiding this comment.
technically this is a replacement effect
not sure yet if the static approach is better for both
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An attempt to refactor 3 hidden player keywords related to "search library" from #4760 :
Tested using
Stoneforge Mystic,Mindlock Orb,Ashiok, Dream Render,Aven Mindcensor. Example of applying library search limit of 4 cards: